package org.example.ssmioc1.service;

import lombok.Data;
import org.springframework.beans.factory.Aware;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
@Configuration
@Data
public class hahaservice implements EnvironmentAware , BeanNameAware {
    public Environment environment;
    public String beanName;
    @Override
    public void setEnvironment(Environment environment) {
        this.environment = environment;
    }

    @Override
    public void setBeanName(String name) {
        beanName = name;
    }

    public String getEnvironment() {
        return environment.getProperty("os");
    }

}
